package com.edu.glutdataconvertclient.service.impl;

import com.edu.glutdataconvertclient.service.MqService;
import com.edu.glutdataconvertcommon.domain.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * @author ares
 */
@Slf4j
@Service
public class MqServiceImpl implements MqService {

    private RabbitTemplate rabbitTemplate;

    @Autowired
    public MqServiceImpl(RabbitTemplate rabbitTemplate) {
        this.rabbitTemplate = rabbitTemplate;
    }

    @Override
    public void directGxjxJhkczlbs(List<TGlutDcJhkczlb> tGlutDcJhkczlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "jhkczlb", tGlutDcJhkczlbs, correlationData);
    }

    @Override
    public void directGxjxJsjbsjzlb(List<TGlutDcJsjbsjzlb> tGlutDcJsjbsjzlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "jsjbsjzlb", tGlutDcJsjbsjzlbs, correlationData);
    }

    @Override
    public void directGxjxJxhbxx(List<TGlutDcJxhbxx> tGlutDcJxhbxxes) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "jxhbxx", tGlutDcJxhbxxes, correlationData);
    }

    @Override
    public void directGxjxKcsjlb(List<TGlutDcKcsjlb> tGlutDcKcsjlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "kcsjlb", tGlutDcKcsjlbs, correlationData);
    }

    @Override
    public void directGxjxKcsjlbXxxs(List<TGlutDcKcsjlbXxxs> tGlutDcKcsjlbXxxs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "kcsjlbXxxs", tGlutDcKcsjlbXxxs, correlationData);
    }

    @Override
    public void directGxjxKsapsjlb(List<TGlutDcKsapsjlb> tGlutDcKsapsjlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksapsjlb", tGlutDcKsapsjlbs, correlationData);
    }

    @Override
    public void directGxjxSkjsxx(List<TGlutDcSkjsxx> tGlutDcSkjsxxes) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "skjsxx", tGlutDcSkjsxxes, correlationData);
    }

    @Override
    public void directGxjxXksjlb(List<TGlutDcXksjlb> tGlutDcXksjlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "xksjlb", tGlutDcXksjlbs, correlationData);
    }

    @Override
    public void directGxjxZtjhzlb(List<TGlutDcZtjhzlb> tGlutDcZtjhzlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ztjhzlb", tGlutDcZtjhzlbs, correlationData);
    }

    @Override
    public void directGxjxZyxxsjlb(List<TGlutDcZyxxsjlb> tGlutDcZyxxsjlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ztjhzlb", tGlutDcZyxxsjlbs, correlationData);
    }

    @Override
    public void directGxxsXjjbsjzlb(List<TGlutDcXjjbsjzlb> tGlutDcXjjbsjzlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "xjjbsjzlb", tGlutDcXjjbsjzlbs, correlationData);
    }

    @Override
    public void directGxxsXsjbsjzl(List<TGlutDcXsjbsjzl> tGlutDcXsjbsjzls) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "xsjbsjzl", tGlutDcXsjbsjzls, correlationData);
    }

    @Override
    public void directGxxxBjsjlb(List<TGlutDcBjsjlb> tGlutDcBjsjlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "bjsjlb", tGlutDcBjsjlbs, correlationData);
    }

    @Override
    public void directViewKsJiankao(List<TGlutDcJiankao> tGlutDcJiankaos) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksJiankao", tGlutDcJiankaos, correlationData);
    }

    @Override
    public void directViewKsKsbj(List<TGlutDcKsbj> tGlutDcKsbjs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksKsbj", tGlutDcKsbjs, correlationData);
    }

    @Override
    public void directViewKsKs(List<TGlutDcKs> tGlutDcKs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksKs", tGlutDcKs, correlationData);
    }

    @Override
    public void directViewKsZyjsBj(List<TGlutDcZyjsBj> tGlutDcZyjsBjs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksZyjsBj", tGlutDcZyjsBjs, correlationData);
    }

    @Override
    public void directViewKsZyjsKaosheng(List<TGlutDcZyjsKaosheng> tGlutDcZyjsKaoshengs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksZyjsKaosheng", tGlutDcZyjsKaoshengs, correlationData);
    }

    @Override
    public void directViewKsZyjs(List<TGlutDcZyjs> tGlutDcZyjs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "ksZyjs", tGlutDcZyjs, correlationData);
    }

    @Override
    public void directViewBmxx(List<TGlutDcBmxx> glutDcBmxxes) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "bmxx", glutDcBmxxes, correlationData);
    }

    @Override
    public void directViewJssysjzlb(List<TGlutDcJssysjzlb> tGlutDcJssysjzlbs) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "jssysjzlb", tGlutDcJssysjzlbs, correlationData);
    }

    @Override
    public void directViewJwKsqlcJgxx(List<Map> viewGlutJwKsqlcJgxxes) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "jwKsqlcJgxx", viewGlutJwKsqlcJgxxes, correlationData);
    }

    @Override
    public void directViewKcbJs(List<TGlutDcKcbJs> TGlutDcKcbJS) {
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend("glutExchange", "viewKcbJs", TGlutDcKcbJS, correlationData);
    }

}
